import com.github.pagehelper.PageInfo;

import java.util.LinkedList;
import java.util.List;

public class A
{
    int id;
    String name;

    public A() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "A{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

    public A(int id, String name) {
        this.id = id;
        this.name = name;
    }


    public static void main(String[] args) {
        List<A> list = new LinkedList<>();
        list.add(new A(1,"1"));
        list.add(new A(2,"2"));
        list.add(new A(3,"3"));
        list.add(new A(4,"4"));
        list.add(new A(5,"5"));
        list.add(new A(6,"6"));
        PageInfo<A> pi = new PageInfo<>(list);
        pi.setSize(2);
        pi.setPages(3);
        System.out.println(pi);
        List<A> list1 = pi.getList();
        for (A a : list1) {
            System.out.println(a);

        }
    }

}
